Skip to content

Include C++17 type_traits and C++20 chrono calendars - #8

Open
trxcllnt wants to merge 5 commits into
ogiroux:masterfrom
trxcllnt:use-new-c++-features
Open

trxcllnt wants to merge 5 commits into
ogiroux:masterfrom
trxcllnt:use-new-c++-features

Conversation

@trxcllnt

Copy link
Copy Markdown
Contributor

This PR and its sister PR in ogiroux/libcxx encapsulate the changes necessary to use the C++17 type_traits and C++20 chrono calendars in cudf with the -std=c++14 flag.

C++17 type_traits

25eb5eb makes the following modifications:

  • Defines _LIBCPP_HAS_NO_IS_AGGREGATE in __config
  • Wraps type_traits include in block with _LIBCPP_STD_VER redefined to 17

C++20 chrono calendars

This task was more involved, and I couldn't get it working without also modifying ogiroux/libcxx.

  1. ogiroux/libcxx@34b5d0e defines a new _LIBCPP_INLINE_CONSTEXPR macro to replace the inline constexpr variable declarations with static constexpr
  2. ogiroux/libcxx@3662fa5 makes the private static __ratio_multiply and __ratio_divide members public, which was the only solution I found to these compiler errors. Open to suggestions on a better fix here.
  3. ogiroux/libcxx@0c4ee1a comments out the hh_mm_ss implementation, which was the only solution I found to these compiler errors.
  4. ec493a5 and ogiroux/libcxx@2afe936 move the external system_clock into libcxx directly, because the subsequent types rely on sys_time already being defined.
    • ec493a5 wraps chrono include in a block with _LIBCPP_STD_VER redefined to 20, and undefines _LIBCPP_HAS_CLOCK_API_EXTERNAL.
    • I attempted to avoid this with forward declarations for time_point, but couldn't get it to compile. This is probably the nastiest change, so I'm open to alternative fixes here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant